package com.example.shopsystem.dao;

import com.example.shopsystem.entity.Administrator;

import com.example.shopsystem.entity.BossCost;
import com.example.shopsystem.entity.Power;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface AdminMapper {
    Boolean register(@Param("administrator") Administrator administrator);//注册
    Boolean givePower(@Param("adminId") String adminId,@Param("powerId") int powerId);//给与权限
    Administrator queryAdmin(@Param("adminId")String adminId);//查询管理员
    Boolean deletePower(@Param("adminId") String adminId,@Param("powerId") int powerId);//删除权限
    List<BossCost> ViewFinance(@Param("beginTime" )Date beginTime,@Param("dieTime" ) Date dieTime);//查看指定日期的老板的账单
    List<Power> queryAdminPow(@Param("adminId") String adminId);//查看管理员的权限
    List<Administrator> queryAdminList();
    List<Administrator> queryAdminName(@Param("name")String name);
    Boolean modifyAdmin(@Param("administrator") Administrator administrator);
}
